#include "lotusnotes.h"
BOOL HookLotusFunctions()
{
	return
	((OSPathNetConstruct1 = (OSPATHNETCONSTRUCT)GetProcAddress(hDll,"OSPathNetConstruct"))&&
	(NotesInitExtended1 = (NOTESINITEXTENDED)GetProcAddress(hDll,"NotesInitExtended"))&&
	(NSFDbOpen1=(NSFDBOPEN)GetProcAddress(hDll,"NSFDbOpen"))&&
	(SECKFMGetUserName1=(SECKFMGETUSERNAME)GetProcAddress(hDll,"SECKFMGetUserName"))&&
	(NSFDbGetUnreadNoteTable1=(NSFDBGETUNREADNOTETABLE)GetProcAddress(hDll,"NSFDbGetUnreadNoteTable"))&&
	(NSFDbUpdateUnread1=(NSFDBUPDATEUNREAD)GetProcAddress(hDll,"NSFDbUpdateUnread"))&&
	(IDScan1=(IDSCAN)GetProcAddress(hDll,"IDScan"))&&
	(NSFNoteOpen1=(NSFNOTEOPEN)GetProcAddress(hDll,"NSFNoteOpen"))&&
	(NSFDbGetNoteInfo1=(NSFDBGETNOTEINFO)GetProcAddress(hDll,"NSFDbGetNoteInfo"))&&
	(NSFItemGetText1=(NSFITEMGETTEXT)GetProcAddress(hDll,"NSFItemGetText"))&&
	(NSFItemGetTime1=(NSFITEMGETTIME)GetProcAddress(hDll,"NSFItemGetTime"))&&
	(ConvertTIMEDATEToText1=(CONVERTTIMEDATETOTEXT)GetProcAddress(hDll,"ConvertTIMEDATEToText"))&&
	(OSTranslate1=(OSTRANSLATE)GetProcAddress(hDll,"OSTranslate"))&&
	(MailGetMessageAttachmentInfo1=(MAILGETMESSAGEATTACHMENTINFO)GetProcAddress(hDll,"MailGetMessageAttachmentInfo"))&&
	(NSFNoteClose1=(NSFNOTECLOSE)GetProcAddress(hDll,"NSFNoteClose"))&&
	(IDDestroyTable1=(IDDESTROYTABLE)GetProcAddress(hDll,"IDDestroyTable"))&&
	(NSFDbClose1=(NSFDBCLOSE)GetProcAddress(hDll,"NSFDbClose"))&&
	(OSLoadString1=(OSLOADSTRING)GetProcAddress(hDll,"OSLoadString"))&&
	(NotesTerm1=(NOTESTERM)GetProcAddress(hDll,"NotesTerm"))&&
	(OSGetEnvironmentString1=(OSGETENVIRONMENTSTRING)GetProcAddress(hDll,"OSGetEnvironmentString"))&&
	(OSSetEnvironmentVariable1=(OSSETENVIRONMENTVARIABLE)GetProcAddress(hDll,"OSSetEnvironmentVariable"))&&
	(NSGetServerList1=(NSGETSERVERLIST)GetProcAddress(hDll,"NSGetServerList"))&&
	(OSLockObject1=(OSLOCKOBJECT)GetProcAddress(hDll,"OSLockObject"))&&
	(OSUnlockObject1=(OSUNLOCKOBJECT)GetProcAddress(hDll,"OSUnlockObject"))&&
	(OSMemFree1=(OSMEMFREE)GetProcAddress(hDll,"OSMemFree"))&&
	(EMRegister1=(EMREGISTER)GetProcAddress(hDll,"EMRegister"))&&
	(EMDeregister1=(EMDEREGISTER)GetProcAddress(hDll,"EMDeregister")) &&
	(NotesInitThread1 = (NOTESINITTHREAD)GetProcAddress(hDll,"NotesInitThread")) &&
	(NotesTermThread1 = (NOTESTERMTHREAD)GetProcAddress(hDll,"NotesTermThread"))
	)? TRUE:FALSE;
}

void GetLotusPath(TCHAR *sTemp, DWORD size)
{
	DWORD rc; 
	HKEY dmKey;

	rc = RegOpenKeyEx( HKEY_LOCAL_MACHINE , "Software\\Lotus\\Notes",0, KEY_QUERY_VALUE, &dmKey ); 

	if (rc != ERROR_SUCCESS) { 
		return; 
	} 

	RegQueryValueEx( dmKey, "Path",NULL,NULL,(BYTE*)sTemp, &size );
	RegCloseKey(dmKey);
	return;	
}

